package day07;

import java.util.Scanner;

/*
* 猜数字游戏*/
public class Gussing {
    public static void main(String[] args) {
        add();
    }
    public static void add(){
        Scanner scanner = new Scanner(System.in);
        int num = (int) (Math.random()*1000+1);
        System.out.println("游戏开始");
        while (true){
            int s = scanner.nextInt();
            if (s>num){
                System.out.println("猜大了");
            }else if (s<num){
                System.out.println("猜小了");
            }else {
                System.out.println("恭喜你猜对了");
                break;
            }
        }
    }
}
